import 'package:flutter/material.dart';

class EgTransform extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    var m4 = Matrix4.rotationX(0.8);
    m4.add(Matrix4.rotationY(0.8));
    m4.add(Matrix4.rotationZ(0.2));

    return new Scaffold(
      appBar: new AppBar(
        title: new Text("转换组件"),
      ),
      body: new Center(
        child: new Container(
          color: Colors.grey,
          child: Transform(
            transform: m4,
            alignment: Alignment.topRight,
            child: new Container(
              padding: EdgeInsets.all(8.0),
              color: Colors.red,
              child: Text("Transform 矩阵转换"),
            ),
          ),
        ),
      ),
    );
  }
}
